﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarterWechatServer.DataEntity.Entities
{
    [Table("OrderInfo")]
    public class OrderInfoEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 订单Id
        /// </summary>
        [ForeignKey("Order")]
        public int OrderId { get; set; }

        /// <summary>
        /// 菜品Id
        /// </summary>
        [ForeignKey("Dish")]
        public int DishId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 小计
        /// </summary>
        public int Amount { get; set; }

        public virtual OrderEntity Order { get; set; }

        public virtual  DishEntity Dish { get; set; }
    }
}
